<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@include file="m_head.jsp" %>
<%@page import="com.card.user.*" %>	
<%
	String id = request.getParameter("id");
	Admin agent = AdminManager.getInstance().getAdminById(id);
%>
<body>
	<div data-role="page" id="demo-page">
		<div data-role="header">
	        <h1>账号详情</h1>
	        <a href="#myPanel" data-icon="bars" data-shadow="false" data-iconshadow="false">菜单</a>
	    </div>
	    <div role="main" class="ui-content">
	    	<form>
				<label for="text" data-theme="e">ID:<%=agent.getId() %></label> </br>
				<label for="text-1" data-theme="e">账号:<%=agent.getName() %></label> </br>
				<label for="text-1" data-theme="e">父代理:<%=agent.getFatherName() %></label> </br>
				<label for="text-1" data-theme="e">密码:<%=agent.getPassword() %></label> </br>
				<label for="text-1" data-theme="e">手机号:<%=agent.getPhone() %></label> </br>
				<label for="text-1" data-theme="e">房卡:<%=agent.getGold() %></label> </br>
				<label for="text-1" data-theme="e">状态:<%=(agent.getState()==StringParam.State_Free?"正常":"已冻结") %></label> </br>
			</form>
			<div data-role="controlgroup" data-type="vertical">
			<script type="text/javascript">
				function remove_agent(a_id)
				{
					var code = confirm("确认要删除吗?");
					if(code == true) {
						location.href="/GameServer/doActionPhone?action=delagent&id="+a_id;
					}
				}
				
				function change_agent(a_id)
				{
					var code = confirm("确认要改变吗?");
					if(code == true) {
						location.href="/GameServer/doActionPhone?action=changeagent&id="+a_id;
					}
				}
			</script>
			<%-- <a href="m_gonghui_info.jsp?id=<%=agent.getId() %>" data-role="button">我的工会</a> --%>
	        <a href="m_agent_cz.jsp?id=<%=agent.getId() %>" data-role="button">充值</a>
			<a href="m_cz_log.jsp?id=<%=agent.getId() %>" data-role="button">充值记录</a>
			
			<%if(agent.getFatherId()<=1) {%>
		        <a href="m_agent_list.jsp?id=<%=agent.getId() %>&name=<%=agent.getName() %>" data-role="button">他的代理</a>
			<%} %> 
			<input type="button" onclick="change_agent(<%=agent.getId() %>)" value="<%=agent.getStateTtr() %>">
			<input type="button" onclick="remove_agent(<%=agent.getId() %>)" value="删除">
	    </div>
	    </div>
		<%@include file="m_order.jsp"%>
	</div>
</body>
</html>